x86: adjust Dom0 initial memory allocation strategy
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 15 Mar 2010 13:25:30 +0000 (13:25 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 15 Mar 2010 13:25:30 +0000 (13:25 +0000)
commitddf12db57949a7becc3e991007ce12e28c2768bc
tree443084e9a779a40b8bf21a2b27d6801245548f0f
parent4280d3ee4cb16ef462172e1da5dc3a1ff5719782
x86: adjust Dom0 initial memory allocation strategy

Simply trying order-9 allocations until they won't succeed anymore
may consume unnecessarily much memory from the DMA zone (since the
page allocator will try to fulfill the request by using memory from
that zone when only lower order memory blocks are left in all other
zones). To avoid using DMA zone memory, make alloc_chunk() try to
allocate a second smaller chunk and use that one in favor of the
first one if it came from a higher addressed memory. This way, all
memory outside the DMA zone will be consumed before eating into that
zone.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/domain_build.c